
//根据页面窗口大小操作html字体大小
(function (doc, win) {
	var docEl = doc.documentElement,
	resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
	recalc = function () {
	var clientWidth = docEl.clientWidth;
	var font_size = 13; 
	if (!clientWidth) return;

		if(clientWidth >= 320){
			docEl.style.fontSize = font_size * (clientWidth / 320) + 'px';
		}else{
			docEl.style.fontSize = font_size + 'px';   
		}
		
	};
	if (!doc.addEventListener) return;
	win.addEventListener(resizeEvt, recalc, false);
	doc.addEventListener('DOMContentLoaded', recalc, false);
})(document, window);